/**
 * Created by Radish608 on 2017/3/22.
 */

public class Student {
    private String name;
    private int ID;
    private int javaGrade;

    public Student(String name,int ID,int javaGrade) {
        this.name = name;
        this.ID = ID;
        this.javaGrade = javaGrade;
    }

    public void setName(String name) {
        this.name = name;
    }

    public void setID(int ID) {
        this.ID = ID;
    }

    public void setJavaGrade(int javaGrade) {
        this.javaGrade = javaGrade;
    }

    public String getName() {
        return this.name;
    }

    public int getID() {
        return this.ID;
    }

    public int getJavaGrade() {
        return this.javaGrade;
    }

    @Override

    public boolean equals(Object other) {
        if(this == other) {
            return true;
        }

        if(!(other instanceof Student)) {
            return false;
        }

        Student student = (Student) other;

        if(!getName().equals(student.getName())) {
            return false;
        }

        if(!getID()==(student.getID())) {
            return false;
        }

        if(!getJavaGrade()==(student.getJavaGrade())) {
            return false;
        }

        return true;
    }

}
